
#include	"SysConfig.h"
#include	"Define.h"
#include	"Model_Option.h"

unsigned char ucRTC_Hour;
unsigned char ucRTC_Min;
unsigned char ucRTC_Sec;
extern unsigned char Timer_1sec;

void RTC_CountUp(void)
{
#ifdef  OPTIONAL_CLOCK
	if  (OPT_GetOption(OPT_MASK_CLOCK) == 0)
	{
		return;
	}
#endif
	if  (Timer_1sec != 0)
	{
		--Timer_1sec;
		if  (++ucRTC_Sec > 59)
		{
			ucRTC_Sec = 0;
			if  (++ucRTC_Min > 59)
			{
				ucRTC_Min = 0;
				if  (++ucRTC_Hour > 23)
				{
					ucRTC_Hour = 0;
				}
			}
		}
		LOG_RTC("Time:H%d M:%d S:%d", ucRTC_Hour, ucRTC_Min, ucRTC_Sec);
	}
}



